FROM eclipse-temurin:17-jdk-alpine
ARG appJar
ARG workspace=/workspace
COPY build/libs/$appJar $workspace/app.jar
COPY build/resources/main $workspace/
RUN chmod 777 -R $workspace
WORKDIR $workspace
RUN touch -c app.jar
ENTRYPOINT ["sh", "-c", "java ${JAVA_TOOL_OPTIONS} -jar app.jar"]